Welcome![Sign In][Sign Up]
Location:
Search - TD AT

Search list

[GUI Developbrew window manager

Description:

 

Objective
This topic describes how to create a windowed application that will share the display with other applications.
Brew® MP windowed applications need to be written differently than traditional Brew MP applications. Traditional Brew MP applications, when running in the foreground, occupy full screen space and can modify the display at any time. In the windowing framework, multiple applications share the display at the same time and are not allowed to modify the display arbitrarily. A windowed application also needs to create one or more widgets to be used to create the windows.
A windowed application needs to:
·                  Create and initialize one or more widgets to be passed to IWindowMgr_CreateWindow().
The application can implement its own IWidget, or it can make use of an existing IWidget.
·                  Handle the EVT_APP_START_WINDOW event (and create a window).
·                  Implement handlers for visibility changes, focus changes, and extent changes. The implementation of these handlers is dependent on the details of the application.
·                  Draw in two stages:
·                                  Tell the container that drawing is necessary (ICONTAINER_Invalidate()).
·                                  Draw only when told to draw by the container (IWIDGET_Draw()).
Note: A windowed application should not call any functions that modify IDisplay directly. This includes explicit IDisplay function calls or implicit updates, such as calls to IIMAGE_Draw() or ICONTROL_Redraw(). Drawing should happen only on demand, for example, when IWIDGET_Draw() is called for the widget used to create the window. Existing Widget based applications follow these guidelines and, with minor modifications, can be ported to the windowing framework.
Event handling
A windowed application must respond to these events:
EVT_APP_START_WINDOW and EVT_APP_START
A window-based application receives EVT_APP_START_WINDOW first. If the application returns TRUE for this event, the application does not receive EVT_APP_START. If an application needs to support both the environments (window based and non-window based), it should handle both events.
When the application receives EVT_APP_START_WINDOW, it should create one or more windows.
If creation of IWindowMgr0 fails while handling EVT_APP_START_WINDOW, the application should assume that the platform does not support window-based applications. In this case, the application should return FALSE and continue the application logic in the code for EVT_APP_START.
EVT_APP_SUSPEND and EVT_APP_RESUME
After an application returns TRUE for EVT_APP_START_WINDOW, it will not receive EVT_APP_SUSPEND and EVT_APP_RESUME as non-windowed Brew MP applications do. Instead, the application must check for window status events that are sent to the widget through EVT_WDG_SETPROPERTY events. For EVT_WDG_SETPROPERTY events, wParam indicates which property was set, and dwParam specifies the value of the property. When the AEEWindowMgrExt_PROPEX_STATE property has a value of AEEWindowMgrExt_STATE_VISIBLE, the window is visible.
EVT_WDG_WINDOWSTATUS
The EVT_WDG_WINDOWSTATUS event is sent to a widget to notify it about various window related status messages. AEEWindowStatus.h contains information on the meaning of various status messages.
Sample code location

ZIP filename
Location
Run app
hellowindowapp
Brew MP Library
·                       Download and extract the ZIP file.
·                       Compile the app.
·                       Run it on the Brew MP Simulator.

Example of a windowed application
In the hellowindowapp sample, HelloWindowApp_HandleEvent handles the EVT_APP_START_WINDOW event and creates soft key and pop-up windows:
   case EVT_APP_START_WINDOW:   
      DBGPRINTF("EVT_APP_START_WINDOW");
 
      // Create the softkey and popup windows
      HelloWindowApp_CreateSoftkey(pMe);
      HelloWindowApp_CreateOrActivatePopup(pMe);
 
      // Handling this event tells Brew that we are a windowing
      // application.
      return TRUE;  
HelloWindowApp_CreateSoftkey() creates the soft key widget, sets the color text of the widget, then calls HelloWindowApp_CreateWindow() to create the window.
   WidgetWindow *pWindow = &pMe->softkeyWindow;
  
   if (pWindow->piWindowWidget != NULL) return;
   pWindow->pszDbgName = "Softkey";
   pWindow->pMe = pMe;
  
   (void) ISHELL_CreateInstance(pMe->applet.m_pIShell, AEECLSID_SoftkeyWidget,
            (void **) &pWindow->piWindowWidget);
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WidgetExtent extent = {0, HWA_SOFTKEY_HEIGHT};
      IWidget_SetExtent(pWindow->piWindowWidget, &extent);
   }
  
   (void) IWidget_SetBGColor(pWindow->piWindowWidget, MAKE_RGBA(200,200,200,255));
  
   // Now set the softkeys text
   {
      IWidget *piTextWidget = NULL;
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY1, &piTextWidget);
     
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Hover", TRUE);
      }
      RELEASEIF(piTextWidget);
 
      (void) IWidget_GetSoftkey(pWindow->piWindowWidget, PROP_SOFTKEY2, &piTextWidget);
      if (piTextWidget != NULL) {
         (void) IWidget_SetText(piTextWidget, L"Close", TRUE);
      }
      RELEASEIF(piTextWidget);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Softkey);  
HelloWindowApp_CreateWindow() creates the soft key window, as follows:
   int result;
   uint32 winId;
   AEEWindowProp propList[1];
  
   // Set custom window handler
   HANDLERDESC_Init(&pWindow->hdHandler, HelloWindowApp_WindowHandler, pWindow, NULL);
   IWIDGET_SetHandler(pWindow->piWindowWidget, &pWindow->hdHandler);
        
   propList[0].id = AEEWindowMgrExtProp_CLASS;
   propList[0].pbyLen = sizeof(winClass);
   propList[0].pby = (void *) &winClass;
     
   result = IWindowMgr_CreateWindow(pMe->piWindowMgr, (IQI*) (void *) pWindow->piWindowWidget,
      propList, ARR_SIZE(propList), &winId);
 
   if (result != SUCCESS) {
      DBGPRINTF("Window creation failed for %s: %d", pWindow->pszDbgName, result);
      HelloWindowApp_DestroyWindow(pWindow);
   } else {
      DBGPRINTF("Window %s created: id=%d", pWindow->pszDbgName, winId);
   }
HelloWindowApp_CreateOrActivatePopup() creates the widget for the pop-up window, then calls HelloWindowApp_CreateWindow() to create the pop-up window.
   pWindow->piWindowWidget = HelloWindowApp_CreateAndInitImageWidget(
                                pMe,
                                "popups.main" // Image as defined in appinfo.ini
                             );
 
   if (pWindow->piWindowWidget == NULL) return;
 
   {
      WExtent extent = {HWA_POPUP_WIDTH, HWA_POPUP_HEIGHT};
      IWIDGET_SetExtent(pWindow->piWindowWidget, &extent);
   }
 
   HelloWindowApp_CreateWindow(pMe, pWindow, AEEWindowMgrExt_CLASS_Popup);
Related information
·                  See Brew MP Widgets Technology Guide: Creating a Widgets application
·                  See Brew MP API Reference

Base version:
Brew MP 1.0
Tested version:
Brew MP 1.0
Phone tested:
No

 

Platform: | Size: 439828 | Author: bluecrest | Hits:

[Modem programGSM_模块

Description: gsm模块AT指令代码-gsm AT command module code
Platform: | Size: 53248 | Author: 苏明然 | Hits:

[Program docTD-SCDMAhansai

Description: 3g大唐标准,td,在3g即将到来的今天,此资料尤为珍贵,希望大家喜欢,-3g Datang standards, td, in the upcoming 3g Today, this information is especially valuable, hope you like them, thank you
Platform: | Size: 2026496 | Author: bowenhs | Hits:

[OtherFlashElementTD2

Description: 魔兽flash防守塔游戏2,35关,难度比1大 开始时有点难度-EverQuest flash defensive game 2,35 tower clearance, a major difficulty than at the beginning of a bit more difficult
Platform: | Size: 643072 | Author: zzd | Hits:

[matlabUnitary_Space-Time_Code_in_TD-SCDMA

Description: 根据TD-SCDMA系统的特点,给出USTC码(酉空时码)在TD-SCDMA系统中的应用仿真程序,希望大家看看,很有创新-According to TD-SCDMA system features, given USTC code (Unitary Space-Time Code) in the TD-SCDMA system simulation program, hope that we look at innovative
Platform: | Size: 672768 | Author: 李白 | Hits:

[Program docTD-SCDMAPrinciple

Description: 李世鹤写的TD-CDMA原理介绍,还是比较经典。 To站长:我急于下点东西,不好找资料,你快批我,我以后再送些更好的。:)-Li Shihe written introduce TD-CDMA principle, it is quite classic. To head: I hurry to the next point of things,不好找information, you quickly approved me, I
Platform: | Size: 1601536 | Author: yy | Hits:

[Embeded LinuxGsmMux

Description: 该源码是针对支持Mux技术的手机Modem的驱动,使用此驱动,你的手机在上网的同时还可以响应AT指令;本驱动支持Motorola的G24和大唐的TD模块中,在多款ARM(如Davinci的DM644x,XScale的ixp42x)得到严正-The source is Mux technical support phone Modem driver, use this drive, your cell phone in the Internet at the same time can also respond to AT commands this driver supports Motorola s G24 and Datang s TD module, in the range of ARM ( such as the Davinci s DM644x, XScale s ixp42x) be solemn
Platform: | Size: 45056 | Author: 新村 | Hits:

[OtherSmart_anntana_ech

Description: 智能天线技术在第三代移动通信网络TD-SCDMA中的技术和应用现状-Smart antenna technology at the third generation mobile communication network of TD-SCDMA technology and application status
Platform: | Size: 188416 | Author: noble | Hits:

[3G developqpsk_kprm

Description: qpsk调制和扩频扰码是无线通信中,基带信号处理很重要的步骤,本程序主要针对td-scdma系统的基带处理-qpsk scrambling code modulation and spread spectrum wireless communication, the baseband signal processing is an important step, the process aimed at td-scdma system baseband processor
Platform: | Size: 1024 | Author: lu xin | Hits:

[Program docpcm

Description: 语音编码方案的选取对移动通信系统的通话质量、信道容量等有重要影响。本文讨论了TD-SCDMA系统中AMR语音编码的自适应机制,同时分析了AMR中代数码本线性预测(ACELP)算法及实现过程。该方案可以在一块TMS320C5510上实现。-The selection of voice coding schemes for mobile communication systems the quality of the call, such as channel capacity have had a significant impact. In this paper, TD-SCDMA System AMR Adaptive speech coding mechanism, at the same time analysis of AMR in the generation of Digital Linear Prediction (ACELP) algorithm and the realization of the process. The program can be achieved in a TMS320C5510.
Platform: | Size: 38912 | Author: 刘文 | Hits:

[assembly language8253

Description: 本报告主要介绍了微机原理与接口技术的应用之一——交通灯控制器的设计与实现,主要是模拟十字路口的红绿灯,还介绍了交通灯控制器的原理以及电路接线,其中主要用到的芯片有可编程并行通信接口芯片8255A。在设计中所用到的编程语言是汇编语言,延时采用的是软件延时(即通过汇编指令)。设计所用到的备是由西安唐都科技仪器公司生产的TD-PIT+实验系统一套。在实验室将汇编程序调试通过后即可看到设计的结果。-This report introduced the Microcomputer Principle and Interface Technology, one- traffic light controller design and realization of the simulation at the crossroads of major traffic lights, traffic lights also introduced the principle of the controller and the circuit wiring, the main use The chip has a programmable communications interface chip parallel 8255A. Used in the design of the programming language is assembly language, delay is used in software delay (that is, through compilation of instructions). Preparation of the design used by the Instrument Science and Technology Garden have produced TD-PIT+ a set of experimental system. In the laboratory testing will be compiled after the adoption of procedures designed to see the results.
Platform: | Size: 70656 | Author: tangshuai | Hits:

[Program doczte

Description: 中兴手机硬件基带培训资料,公司开发平台非常完备,分别是PHS、GSM、CDMA、WCDMA。 自研PDA产品p500已经上市。 TD-SCDMA也在预研中。 固定台产品线也已经成立。-ZTE handsets with hardware-based training materials, the company is very complete development platform, namely, PHS, GSM, CDMA, WCDMA. P500 self-study products available PDA. TD-SCDMA is also in pre-research. Taiwan fixed-line also has been set up.
Platform: | Size: 3001344 | Author: 身等 | Hits:

[Program docSIM4100_ATC_V1.01

Description: 支持TD-SCDMA的模块SIM4100的SIM4100 AT Command Set-Support for TD-SCDMA module SIM4100 of SIM4100 AT Command Set
Platform: | Size: 1089536 | Author: 王青云 | Hits:

[Software EngineeringAtCOMM

Description: 中国移动TD数据卡AT指令接口规范是移动G3卡的AT指令.非常全面,教你如何使用-dd
Platform: | Size: 653312 | Author: | Hits:

[Program docLC6311_AT_Command_Set_User_Manual_20090105

Description: td at指令接口文档。很有用的.供模块开发参靠-interface documentation td at command. Very useful. For module development participation by
Platform: | Size: 1211392 | Author: jndy | Hits:

[SCMjiaotongdeng

Description: 这个是我以前单片机课程设计上我做的程序,希望对你有一定帮助。 要求:根据TD-PIT-B实验箱现有的实验电路,设计电路并编写程序使六个灯按照交通灯变化规律亮、灭或者闪烁。十字路口交通灯的变化规律要求: (6) 南北路口的绿灯,东西路口的红灯同时亮30秒。 (7) 南北路口的黄灯闪烁3次,同时东西路口的红灯继续亮。 (8) 南北路口的红灯,东西路口的绿灯同时亮30秒。 (9) 南北路口的红灯继续亮,同时东西路口的黄灯闪烁3次。 (10) 转(11)重复。-This is my previous MCU design process I do hope you have some help. Requirements: According to the TD-PIT-B Experiment Box existing experimental circuit, circuit design and programming to make six changes of light according to the traffic light on, off or flashing. Changes of traffic lights crossroads requirements: (6) North-South crossing the green light, red light intersection at the same time something light for 30 seconds. (7) North-South crossing the yellow light flashes 3 times, and things continue to light the red light intersection. (8) North-South crossing the red light, green light while crossing things light for 30 seconds. (9) North-South crossing red lights continue to shine, while crossing the yellow light flashing thing 3 times. (10) transfer (11) repeat.
Platform: | Size: 1024 | Author: 辉辉 | Hits:

[matlabballbeam20110127

Description: BALLBEAM demonsrates Proportional-Derivative (PD) control as applied to a ball and beam simulation experiment. Execute by calling with no arguments. P and PD controllers are implemented which manipulates the beam angle in response to the position of the ball on the beam. The setpoint is indicated by the red marker and adjusted using the slider at the bottom of the figure. The control gain, Kc, and the Derivative Time constant, Td, are adjusted by a sliders located in the right hand control panel. Simulation data is stored in ballbeam.mat for subsequent analysis and parameter estimation. This demo was originally developed with Matlab 5.3 and Matlab 6.0. Some of the user interface code was shamelessly ripped out of the standard Matlab demos. The demo is now updated for Matlab 2010b with additional documentation and suggested exercises for classroom use.
Platform: | Size: 65536 | Author: Hamlin DSouza | Hits:

[3G developTD-LTE

Description: 实现了TD-LTE系统上下行结合的程序,包括信道估计、导频插入等,最后衡量系统性能是衡量系统的误码率。-It implemented the process of TD-LTE,including uplink and downlink.It contains channel estimation,pilot inserting and so on.At last,it eatimated the BER performance.
Platform: | Size: 124928 | Author: 燕子 | Hits:

[Industry researchPHP

Description: 在昨日举行的“2011TD-LTE组网技术研讨会”上,工信部科技司调研员叶林表示,我国3G用户已经突破8000万户,其中TD-SCDMA用户占比超过1/3。作为TD-SCDMA的后续演进技术,TD-LTE迎来了历史性的发展机遇-At yesterday' s " 2011TD-LTE network technology seminar" , the Ministry of Science and Technology Division, said researcher Ye Lin, China' s 3G users have exceeded 80 million, including TD-SCDMA users accounting for more than 1/3. As a follow-up the evolution of TD-SCDMA technology, TD-LTE development opportunities ushered in the historic
Platform: | Size: 5278720 | Author: 湿答答 | Hits:

[Embeded LinuxARM

Description: ARM学习规划 [table][tr][td]本帖隐藏的内容需要回复才可以浏览(现在不用回复了) ARM+LINUX路线,主攻嵌入式Linux操作系统及其上应用软件开发目标: (1) 掌握主流嵌入式微处理器的结构与原理(初步定为arm9) (2) 必须掌握一个嵌入式操作系统 (初步定为uclinux或linux,版本待定) (3) 必须熟悉嵌入式软件开发流程并至少做一个嵌入式软件项目。 -ARM learning plan [table] [tr] [td] The Hidden content need to respond before they can view (now do not have responded) ARM+ LINUX line, the main embedded Linux operating system and application software on the development objectives: (1) master the mainstream structure and principle of the embedded microprocessor (initially arm9) (2) must master an embedded operating system (initially uclinux or linux, version to be determined) (3) must be familiar with embedded software development process and at least to do an embedded software project.
Platform: | Size: 7168 | Author: 尚迪 | Hits:
« 12 »

CodeBus www.codebus.net